<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>


    <script>
        // debugger;
        // var声明的变量被挂载到window上，可以通过window.a访问
        // let和const声明的变量是被放在script块级作用域里
        // var a = 10;
        // let b = 20;
        // const c = 30;


        // function foo() {
        //     console.log(this);
        //     var a = 10;
        //     let b = 20;
        //     const c = 30;
        // }
        // foo()


        // console.log(window.a);
        // console.log(window.b);
        // console.log(window.c);
        // console.log(window);

        // let s=new Set();
        // console.log(typeof s);

        // let name = 'zhangsan', age = 18;
        // let obj = {
        //     name,
        //     age
        // }

        let arr = [1, 2, 3, [4, 5]];
        // let [a, b, ...rest] = arr;
        // console.log(a, b,rest);

        // let arr2 = arr.concat();
        // arr[3][0] = 10;
        // console.log(arr, arr2);//[1,2,3,[10,5]]  [1,2,3,[10,5]]

        //IIFE
        // (function () {
        //     console.log('立即执行函数');
        // })()


        // function foo() {
        //     console.log(1111);
        // }
        // foo()

        let num = new Number(10);
        console.log(num);

        console.log(num instanceof Number);

        // console.log(arr instanceof Array);

        let obj={}
        console.log(arr instanceof Object);
        console.log(obj instanceof Object);

        console.log(Array.isArray(obj));


    </script>
</body>

</html>